<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of CalendarDay
 *
 * @author virtual
 */
class CalendarDay {
    var $kids = array(); //kids comming on this day
    var $dayKey; //YYYYMMDD
    var $monthType = "this"; //prev next
    
     public function __construct($key){
         $this->dayKey = $key;
     }
    
     public function addKid($kid){
         array_push($this->kids, $kid);
     }
     
     public function toXml(){
         $result = "<day key=\"". $this->dayKey."\">";
         $result .= "<kids count=\"" .  count($this->kids) . "\">";
         foreach($this->kids as $kid){
             $result .= $kid->toXml();
         }
         $result .= "</kids>";
         $result .= "</day>";
         return $result;
     }
}

?>
